/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package co.com.smart.hawk.controller.impl;

import co.com.smart.hawk.controller.HawkClientesCtrl;
import co.com.smart.hawk.dto.ClienteDTO;
import co.com.smart.hawk.dto.MetaDataComponentDTO;
import co.com.smart.hawk.model.caller.MaestrosCaller;
import co.com.smart.hawk.utilities.Utility.CallBackSmartHawk;
import java.util.List;
import javax.persistence.EntityManager;

/**
 *
 * @author Andres
 */
public class HawkClientesCtrlImpl implements HawkClientesCtrl {

    private EntityManager entityManager;
    MaestrosCaller caller = null;

    public HawkClientesCtrlImpl(EntityManager entityManager) {
        caller = new MaestrosCaller();
        this.entityManager = entityManager;
    }

    @Override
    public void getDataComponent(CallBackSmartHawk<MetaDataComponentDTO> callback) {

        callback.endProcess(caller.consultarMaestros());
    }

    @Override
    public void consultarClientes(CallBackSmartHawk<List<ClienteDTO>> callback) {

        callback.endProcess(caller.consultarClientes());
    }
}
